<!-- 
 @Author: LW  
 @Date: 2021-01-26 14:00:45  
 @function: 跳转其他系统过渡页面
  ---------------------------------------------------------- 
 @Last Modified by:   LW-2021-01-26 14:00:45 
 @Modified function:xxx 
 -->
<template>
  <div class="entrance">
    <el-dropdown class="user">
    </el-dropdown>
    <img src="@/assets/images/entrance/centerlogo.png" alt class="logotit" />
    <div class="box">
    </div>
  </div>
</template>
<script>
import Crypto from '@/utils/crypto';
import LoginHttp from "@/api/initial/login";
const {refreshToken } = LoginHttp;
export default {
  data() {
    return {};
  },
  beforeCreate() {},
  /**
   * html加载完成之前，执行。执行顺序：父组件-子组件
   */
  created() {
  },
  /**
   * 页面初始化方法[html加载完成后执行。执行顺序：子组件-父组件]
   */
  mounted() {
    this.initePage();
  },
  methods: {
    //界面初始化
    initePage(){
       let refreshInfo=this.$route.params.encrypted;
       let user = JSON.parse(Crypto.decryption(refreshInfo));//密文
       if (refreshInfo!="") {
        let par={
            name:user[0],
            refreshToken: user[1]
        };
        refreshToken(par).then(response => {
            let data = response.data;
            if (data.Code === 1000) {
              this.$store.dispatch("user/login", data.Data);
              this.$router.push({ path: "/home" });
            }
          });
       }
    },
  }
};
</script>
<style scoped>
@import "../../assets/css/entrance/index.scss";
</style>
